<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BFC可以防止边框重叠</title>
</head>
<style>
    *{
        margin:0 auto;
    }

    .box{
       border:1px solid #ccc;
       overflow: hidden;
    }
    .left{
        float:left;
        width:100px;
        height:100px;
        background:plum;
    }
</style>
<body>
   <!-- BFC可以包含浮动的元素 -->
   <div class="box">
        <div class="left"></div>
   </div>
   
</body>
</html>